<style>
    .pdiv{
        padding-top: 1px;
        padding-bottom: 0px;
        padding-left: 10px;
    }
    .padding-xs{
        padding: 20px;
    }
</style>
<body>
        <div class="hidden-print padding-xs" >
            <span class="text-danger align-center">(请确认下列打印标签内容)</span>
            <table class="table table-striped 	">
                <tr>
                    <th>编码</th>
                    <th>商品</th>
                    <th>规格</th>
                    <th>批次</th>
                    <th>数量</th>
                    <th>入库时间</th>
                    <th></th>
                </tr>
                <volist name="plist" id="p">
                    <tr>
                        <td>{$p.BIN}</td>
                        <td>{$p.BIN|get_name_by_id=###,'Material_product','BIN','pname'}</td>
                        <td>{$p.BIN|get_name_by_id=###,'Material_product','BIN','spec'}</td>
                        <td>{$p.warn_batch}</td>
                        <td>{$p.cnt}</td>
                        <td>{$p.createAt|time_format}</td>
                    </tr>
                </volist>
            </table>
            <!-- Button trigger modal -->

            <button class="btn btn-danger " disabled="disabled" id="print_btn">正在为打印机准备数据</button>
        </div>
        <div style="font-size: 16px;margin: 0px;" class="visible-print-block" >
        <!--<div style="font-size: 16px;margin: 0px;" class="" >-->
            <volist name="lists" id="list">
                <div class="pdiv">
                    <div class="">
                        <span class=" ">BIN:</span>
                        <span class=" ">{$list.BIN}</span>
                    </div>
                    <div class="">
                        <span class="">YP:</span>
                        <span class="">{$list.warn_batch}</span>
                    </div>
                    <div class="">
                        <span class=" ">PC:</span>
                        <span class=" ">{$list.batch|gr_encode}</span>
                    </div>
                    <div class="text-center" style="text-align:center ">
                        <span class="">{$list.BIN|get_name_by_id=###,'Material_product','BIN','pname'}</span>
                    </div>
                </div>
            </volist>
        </div>
</body>
<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script src="__STATIC__/bootstrapv3/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="__STATIC__/bootstrapv3/css/bootstrap.css" media="all">
<script type="text/javascript">
	$(function(){
        setTimeout(function(){
            $("#print_btn").removeAttr("disabled");
            $("#print_btn").html("打印");
        },4000);
        $("#print_btn").bind("click",function(){
            window.print();
        });

    })
</script>

